from point import Point
def sort_l(l):
    n = len(l)
    for i in range(n):
        for j in range(n):
            if l[i].cost > l[j].cost:
                l[i],l[j] = l[j],l[i]
    for p in l:
        print(p)
p1 = Point(1,1)
p1.cost = 2
p2 = Point(2,2)
p2.cost = 3
p3 = Point(3,3)
p3.cost = 1
l = [p1,p2,p3]

for p in l:
    print(p)

sort_l(l)
print("after sort:")
for p in l:
    print(p)
